using System.Collections.Generic;

namespace YatFram.Browser
{
    public interface ISearchable
    {
//        IEnumerable<IHtmlElement> Find(string selector);
//        IEnumerable<InputElement> FindTextBox(string cssSelector);
        bool Exists { get; }

//        IContainerElement Find(string cssSelector);
        IEnumerable<IContainerElement> Find(CssSelector.CssSelectors selector);
        InputElement FindTextBox(string cssSelector);
        ISingleOption FindSelect(string cssSelector);
        ISingleOption FindRadio(string name);
        IMultipleOptions FindCheckbox(string name);

    }

    public interface IContainerElement : ISearchable, IHtmlElement
    {
        
    }

    public interface IHtmlElement
    {
        void Click();
        string Attribute(string attributeName);
        string Text { get; }
        IEnumerable<string> ClassNames { get; }


        /// <summary>
        /// If there is not a method exposed through this interface for the webdriver you are using, you can use this method to return the underlying element.
        /// Please send a request through to us at yatfram so we can expose it for other people too.
        /// </summary>
        /// <returns></returns>
        object RawElement();

    }
}